package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.Address;
import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.Region;
import com.cskaoyan.bean.User;
import com.cskaoyan.service.RegionService;
import com.cskaoyan.service.UserService;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author tangjian
 * @Date 2021/10/21 15:52
 * @description
 */
@RestController
@RequestMapping("/wx/region")
public class WxRegionController {
    @Autowired
    RegionService regionService;

    // TODO: 2021/10/24 没找到前台
    @RequestMapping("list")
    public BaseRespVo wxRegionList(Integer pid){

        List<Region> regions = regionService.queryById(pid);

        return BaseRespVo.ok(regions);
    }
}
